﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.XtraCharts;

namespace ReportingManager
{
    public static class SetView
    {

        private static void EnableScrolling(XYDiagram diagram)
        {
            diagram.EnableAxisXScrolling = true;
            diagram.EnableAxisXZooming = true;
            diagram.EnableAxisYScrolling = true;
            diagram.EnableAxisYZooming = true;
        }

        public static void GetSelectedView(ExListItem.ViewTip type, ChartControl control)
        {
            DevExpress.XtraCharts.SeriesViewBase series = null;
            switch (type)
            {
                case ExListItem.ViewTip.Bars:
                    series = new DevExpress.XtraCharts.SideBySideBarSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.BarStacked:
                    series = new DevExpress.XtraCharts.StackedBarSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.BarStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedBarSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Bar3D:
                    series = new DevExpress.XtraCharts.SideBySideBar3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Bar3DStacked:
                    series = new DevExpress.XtraCharts.StackedBar3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Bar3DStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedBar3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.ManhattanBar:
                    series = new DevExpress.XtraCharts.ManhattanBarSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Point:
                    series = new DevExpress.XtraCharts.PointSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Line:
                    series = new DevExpress.XtraCharts.LineSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.StepLine:
                    series = new DevExpress.XtraCharts.StepLineSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Spline:
                    series = new DevExpress.XtraCharts.SplineSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Line3D:
                    series = new DevExpress.XtraCharts.Line3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.StepLine3D:
                    series = new DevExpress.XtraCharts.StepLine3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SpLine3D:
                    series = new DevExpress.XtraCharts.Spline3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Pie:
                    series = new DevExpress.XtraCharts.PieSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.PointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Doughnut:
                    series = new DevExpress.XtraCharts.DoughnutSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.PointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Pie3D:
                    series = new DevExpress.XtraCharts.Pie3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.PointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Doughnut3D:
                    series = new DevExpress.XtraCharts.Doughnut3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
                    control.SeriesTemplate.PointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Area:
                    series = new DevExpress.XtraCharts.AreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.AreaStacked:
                    series = new DevExpress.XtraCharts.StackedAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.AreaStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineArea:
                    series = new DevExpress.XtraCharts.SplineAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineAreaStacked:
                    series = new DevExpress.XtraCharts.StackedSplineAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineAreaStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedSplineAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Area3D:
                    series = new DevExpress.XtraCharts.Area3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Area3DStacked:
                    series = new DevExpress.XtraCharts.StackedArea3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Area3DStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedArea3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineArea3D:
                    series = new DevExpress.XtraCharts.SplineArea3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineArea3DStacked:
                    series = new DevExpress.XtraCharts.StackedSplineArea3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SplineArea3DStackedYuzde:
                    series = new DevExpress.XtraCharts.FullStackedSplineArea3DSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.RadarPoint:
                    series = new DevExpress.XtraCharts.RadarPointSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.RadarLine:
                    series = new DevExpress.XtraCharts.RadarLineSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.RadarArea:
                    series = new DevExpress.XtraCharts.RadarAreaSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.RangeBar:
                    series = new DevExpress.XtraCharts.OverlappedRangeBarSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SideBySideRangeBar:
                    series = new DevExpress.XtraCharts.SideBySideRangeBarSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.Gantt:
                    series = new DevExpress.XtraCharts.OverlappedGanttSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.SideBySideGantt:
                    series = new DevExpress.XtraCharts.SideBySideGanttSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;

                    break;
                case ExListItem.ViewTip.Stock:
                    series = new DevExpress.XtraCharts.StockSeriesView();
                    control.SeriesTemplate.View = series;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
                case ExListItem.ViewTip.CandleStick:
                    series = new DevExpress.XtraCharts.CandleStickSeriesView();
                    control.SeriesTemplate.View = series;
                    EnableScrolling((XYDiagram)control.Diagram);
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.LegendPointOptions.ValueNumericOptions.Precision = 0;
                    control.SeriesTemplate.LegendPointOptions.PointView = PointView.ArgumentAndValues;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Format = NumericFormat.General;
                    control.SeriesTemplate.PointOptions.PointView = PointView.Values;
                    control.SeriesTemplate.PointOptions.ValueNumericOptions.Precision = 0;
                    break;
            }
        }
    }
}
